package com.eorchis.module.classauditinfo.ui.commond;

import java.io.Serializable;

import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.core.ui.commond.ICommond;
import com.eorchis.module.classauditinfo.domain.ClassAuditInfo;
import com.eorchis.module.trainingclass.domain.TrainingClass;
import com.eorchis.module.user.domain.User;
import com.eorchis.utils.utils.PropertyUtil;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.hibernate.validator.constraints.NotBlank;
import com.eorchis.core.ui.commond.ICommonField;


/**
 * Title: ClassAuditInfoValidCommond<br>
 * Description: 班级审核信息ValidCommond<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author Max
 * @createDate 2013-12-31
 * @version $Revision$
 */
public class ClassAuditInfoValidCommond implements ICommond,ICommonField {
	
	private ClassAuditInfo classAuditInfo;
	private String classId;//班级id
	private String auditingDateStr;//审核时间
	

	public String getAuditingDateStr() {
		if(PropertyUtil.objectNotEmpty(classAuditInfo.getCreateDate())){
			Date  date = classAuditInfo.getCreateDate();
			SimpleDateFormat s=new SimpleDateFormat("yyyy-MM-dd HH:mm");
			return s.format(date);
		}
		return "";
	}

	public void setAuditingDateStr(String auditingDateStr) {
		this.auditingDateStr = auditingDateStr;
	}

	public String getClassId() {
		return classId;
	}

	public void setClassId(String classId) {
		this.classId = classId;
	}

	public ClassAuditInfoValidCommond(){
		classAuditInfo = new ClassAuditInfo();
	}
	
	public ClassAuditInfoValidCommond(ClassAuditInfo classAuditInfo){
		this.classAuditInfo = classAuditInfo;
	}

	public Serializable getEntityID() {
		return classAuditInfo.getAuditId();
	}

	public IBaseEntity toEntity() {
		return classAuditInfo;
	}

	/**
	 * 获取ID
	 */	
	public String getAuditId() {
		return classAuditInfo.getAuditId();
	}
	/**
	 * 设置ID
	 */		
	public void setAuditId(String auditId) {
		classAuditInfo.setAuditId(auditId);
	}
	/**
	 * 获取状态
	 */	
	public Integer getAduitState() {
		return classAuditInfo.getAduitState();
	}
	/**
	 * 设置状态
	 */		
	public void setAduitState(Integer aduitState) {
		classAuditInfo.setAduitState(aduitState);
	}
	/**
	 * 获取审核意见
	 */	
	public String getAuditReason() {
		return classAuditInfo.getAuditReason();
	}
	/**
	 * 设置审核意见
	 */		
	public void setAuditReason(String auditReason) {
		classAuditInfo.setAuditReason(auditReason);
	}
	
	public Date getCreateDate() {
		return classAuditInfo.getCreateDate();
	}

	public void setCreateDate(Date createDate) {
		classAuditInfo.setCreateDate(createDate);
	}

	public Integer getActiveState() {
		
		return classAuditInfo.getActiveState();
	}

	public void setActiveState(Integer activeState) {
		classAuditInfo.setActiveState(activeState);
	}

	public User getCreateUser() {
		return classAuditInfo.getCreateUser();
	}
	public void setCreateUser(User createUser) {
		classAuditInfo.setCreateUser(createUser);
	}
	
	
	public TrainingClass getTrainingClass() {
		return classAuditInfo.getTrainingClass();
	}
	public void setTrainingClass(TrainingClass trainingClass) {
		classAuditInfo.setTrainingClass(trainingClass);
	}
}
